Now that you know how to use while
loops, we'll combine them with some othercontrol flow statements (like if
/else
) to create a dragon slaying mini game.
In this game, you’ll battle a dragon. It will take 4 hits to slay the dragon, and if you miss even one hit, the dragon will defeat you!